
# -*- coding:utf-8 -*-

import cv2

class SimplePreprocessor:

    def __init__(self,width,height,inter=cv2.INTER_AREA):

        # store the target image width,height ,and interpolation
        # method used when resizing
        self.width  = width
        self.height = height
        self.inter  = inter

    def process(self,image):

        # resize the image to a fixed size, ignoring the aspect ratio
        return cv2.resize(image,(self.width,self.height),interpolation=self.inter)